3.126 \(\int \frac{\sec (c+d x)}{(a+i a \tan (c+d x))^2} \, dx\)

Optimal. Leaf size=65 \[ \frac{i \sec (c+d x)}{3 d \left (a^2+i a^2 \tan (c+d x)\right )}+\frac{i \sec (c+d x)}{3 d (a+i a \tan (c+d x))^2} \]

[Out]

((I/3)*Sec[c + d*x])/(d*(a + I*a*Tan[c + d*x])^2) + ((I/3)*Sec[c + d*x])/(d*(a^2 + I*a^2*Tan[c + d*x]))

________________________________________________________________________________________

Rubi [A]  time = 0.0539423, antiderivative size = 65, normalized size of antiderivative = 1., number of steps used = 2, number of rules used = 2, integrand size = 22, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.091, Rules used = {3502, 3488} \[ \frac{i \sec (c+d x)}{3 d \left (a^2+i a^2 \tan (c+d x)\right )}+\frac{i \sec (c+d x)}{3 d (a+i a \tan (c+d x))^2} \]

Antiderivative was successfully verified.

[In]

Int[Sec[c + d*x]/(a + I*a*Tan[c + d*x])^2,x]

[Out]

((I/3)*Sec[c + d*x])/(d*(a + I*a*Tan[c + d*x])^2) + ((I/3)*Sec[c + d*x])/(d*(a^2 + I*a^2*Tan[c + d*x]))

Rule 3502

Int[((d_.)*sec[(e_.) + (f_.)*(x_)])^(m_.)*((a_) + (b_.)*tan[(e_.) + (f_.)*(x_)])^(n_), x_Symbol] :> Simp[(a*(d
*Sec[e + f*x])^m*(a + b*Tan[e + f*x])^n)/(b*f*(m + 2*n)), x] + Dist[Simplify[m + n]/(a*(m + 2*n)), Int[(d*Sec[
e + f*x])^m*(a + b*Tan[e + f*x])^(n + 1), x], x] /; FreeQ[{a, b, d, e, f, m}, x] && EqQ[a^2 + b^2, 0] && LtQ[n
, 0] && NeQ[m + 2*n, 0] && IntegersQ[2*m, 2*n]

Rule 3488

Int[((d_.)*sec[(e_.) + (f_.)*(x_)])^(m_.)*((a_) + (b_.)*tan[(e_.) + (f_.)*(x_)])^(n_), x_Symbol] :> Simp[(b*(d
*Sec[e + f*x])^m*(a + b*Tan[e + f*x])^n)/(a*f*m), x] /; FreeQ[{a, b, d, e, f, m, n}, x] && EqQ[a^2 + b^2, 0] &
& EqQ[Simplify[m + n], 0]

Rubi steps

\begin{align*} \int \frac{\sec (c+d x)}{(a+i a \tan (c+d x))^2} \, dx &=\frac{i \sec (c+d x)}{3 d (a+i a \tan (c+d x))^2}+\frac{\int \frac{\sec (c+d x)}{a+i a \tan (c+d x)} \, dx}{3 a}\\ &=\frac{i \sec (c+d x)}{3 d (a+i a \tan (c+d x))^2}+\frac{i \sec (c+d x)}{3 d \left (a^2+i a^2 \tan (c+d x)\right )}\\ \end{align*}

Mathematica [A]  time = 0.0738067, size = 38, normalized size = 0.58 \[ \frac{(\tan (c+d x)-2 i) \sec (c+d x)}{3 a^2 d (\tan (c+d x)-i)^2} \]

Antiderivative was successfully verified.

[In]

Integrate[Sec[c + d*x]/(a + I*a*Tan[c + d*x])^2,x]

[Out]

(Sec[c + d*x]*(-2*I + Tan[c + d*x]))/(3*a^2*d*(-I + Tan[c + d*x])^2)

________________________________________________________________________________________

Maple [A]  time = 0.044, size = 57, normalized size = 0.9 \begin{align*} 2\,{\frac{1}{{a}^{2}d} \left ({\frac{i}{ \left ( \tan \left ( 1/2\,dx+c/2 \right ) -i \right ) ^{2}}}+ \left ( \tan \left ( 1/2\,dx+c/2 \right ) -i \right ) ^{-1}-2/3\, \left ( \tan \left ( 1/2\,dx+c/2 \right ) -i \right ) ^{-3} \right ) } \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(sec(d*x+c)/(a+I*a*tan(d*x+c))^2,x)

[Out]

2/d/a^2*(I/(tan(1/2*d*x+1/2*c)-I)^2+1/(tan(1/2*d*x+1/2*c)-I)-2/3/(tan(1/2*d*x+1/2*c)-I)^3)

________________________________________________________________________________________

Maxima [A]  time = 0.981063, size = 61, normalized size = 0.94 \begin{align*} \frac{i \, \cos \left (3 \, d x + 3 \, c\right ) + 3 i \, \cos \left (d x + c\right ) + \sin \left (3 \, d x + 3 \, c\right ) + 3 \, \sin \left (d x + c\right )}{6 \, a^{2} d} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sec(d*x+c)/(a+I*a*tan(d*x+c))^2,x, algorithm="maxima")

[Out]

1/6*(I*cos(3*d*x + 3*c) + 3*I*cos(d*x + c) + sin(3*d*x + 3*c) + 3*sin(d*x + c))/(a^2*d)

________________________________________________________________________________________

Fricas [A]  time = 2.21306, size = 86, normalized size = 1.32 \begin{align*} \frac{{\left (3 i \, e^{\left (2 i \, d x + 2 i \, c\right )} + i\right )} e^{\left (-3 i \, d x - 3 i \, c\right )}}{6 \, a^{2} d} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sec(d*x+c)/(a+I*a*tan(d*x+c))^2,x, algorithm="fricas")

[Out]

1/6*(3*I*e^(2*I*d*x + 2*I*c) + I)*e^(-3*I*d*x - 3*I*c)/(a^2*d)

________________________________________________________________________________________

Sympy [F(-2)]  time = 0., size = 0, normalized size = 0. \begin{align*} \text{Exception raised: AttributeError} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sec(d*x+c)/(a+I*a*tan(d*x+c))**2,x)

[Out]

Exception raised: AttributeError

________________________________________________________________________________________

Giac [A]  time = 1.15592, size = 63, normalized size = 0.97 \begin{align*} \frac{2 \,{\left (3 \, \tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right )^{2} - 3 i \, \tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right ) - 2\right )}}{3 \, a^{2} d{\left (\tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right ) - i\right )}^{3}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sec(d*x+c)/(a+I*a*tan(d*x+c))^2,x, algorithm="giac")

[Out]

2/3*(3*tan(1/2*d*x + 1/2*c)^2 - 3*I*tan(1/2*d*x + 1/2*c) - 2)/(a^2*d*(tan(1/2*d*x + 1/2*c) - I)^3)